package cn.aws360.boot.system.api.pojo.request;

import cn.aws360.boot.base.api.validation.ValidationGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author junnan
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("系统字典-写入实例")
public class SysDictWrite {

    @ApiModelProperty(value = "字典 id, 修改时为必传")
    @NotNull(message = "字典 id 不能为空", groups = {ValidationGroup.edit.class})
    private Integer id;

    @ApiModelProperty(value = "字典名称", required = true)
    @NotBlank(message = "字典名称 name 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String name;

    @ApiModelProperty(value = "字典编码", required = true)
    @NotBlank(message = "字典编码 code 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String code;

    @ApiModelProperty(value = "是否系统内置")
    private Integer sysFlag;

}
